package hotel.switchs.oversea.biz.service.impl;

import com.alibaba.fastjson.JSONObject;
import hotel.base.oversea.constant.CommonConstants;
import hotel.base.oversea.service.impl.BaseServiceImpl;
import hotel.base.oversea.utils.DateUtil;
import hotel.base.oversea.utils.JacksonUtil;
import hotel.base.oversea.utils.Result;
import hotel.base.oversea.vo.ResultStatusInfoVo;
import hotel.switchs.oversea.api.VO.*;
import hotel.switchs.oversea.api.VO.SaleRuleVo;
import hotel.switchs.oversea.api.VO.request.*;
import hotel.switchs.oversea.biz.service.SwitchRoomPriceService;
import hotel.switchs.oversea.biz.utils.SwitchsHttpUtils;
import io.micrometer.core.instrument.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author lmf
 * @Date 2020/6/2 15:11
 **/
@Service
public class SwitchRoomPriceServiceImpl extends BaseServiceImpl implements SwitchRoomPriceService {
    Logger logger= LoggerFactory.getLogger(SwitchRoomPriceServiceImpl.class);
    @Value("${profile.type}")
    private String profile;
    /**
     * 获取房价接口
     * @param getRoomPriceVo
     * @return
     */
    @Override
    @Retryable(value = Exception.class,maxAttempts = 4,backoff = @Backoff(delay = 2000,multiplier = 1.5))
    public Result<GetRoonPriceReturnVo> getRoomPriceDirect(GetRoomPriceVo getRoomPriceVo) {
        Map<String,Object> map=new HashMap<>();
        String channel=getRoomPriceVo.getChannel();
        map.put("isGetPurchasePrice",getRoomPriceVo.isGetPurchasePrice());
        if(!getRoomPriceVo.isGetPurchasePrice()){
            if(org.springframework.util.StringUtils.isEmpty(channel)){
                return new Result<>("渠道不能为空", CommonConstants.PARAMETER_ERROR);
            }
            map.put("channel",channel);
        }
        int hotelId=getRoomPriceVo.getHotelId();
        if(hotelId<1){
            return new Result<>("酒店id不能为空", CommonConstants.PARAMETER_ERROR);
        }
        map.put("hotelId",hotelId);
        int[] roomIds=getRoomPriceVo.getRoomIds();
        if(roomIds.length<1){
            return new Result<>("房型id不能为空", CommonConstants.PARAMETER_ERROR);
        }
        if(roomIds.length>30){
            return new Result<>("一次不能超过30个房型", CommonConstants.PARAMETER_ERROR);
        }
        map.put("roomIds",roomIds);
        String startDate=getRoomPriceVo.getStartDate();
        String endDate=getRoomPriceVo.getEndDate();
        if(org.springframework.util.StringUtils.isEmpty(startDate)|| org.springframework.util.StringUtils.isEmpty(endDate)){
            return new Result<>("wrong start|end date:start=null,end=null", CommonConstants.PARAMETER_ERROR);
        }
        map.put("startDate",startDate);
        map.put("endDate",endDate);
        logger.info("获取房价接口");
        String result= SwitchsHttpUtils.sendRequest(map,"GetRoomPriceDirect",profile);
        //对结构进行格式化
        JSONObject jsonObject = JSONObject.parseObject(result);
        System.out.println(result);
        ResultStatusInfoVo resultStatusInfoVo= JacksonUtil.parse(jsonObject.getString("resultStatus"),ResultStatusInfoVo.class);
        if(resultStatusInfoVo.getResultCode()!=0){
            return new Result<>(resultStatusInfoVo.getResultMsg(), CommonConstants.REQUEST_ERROR);
        }
        logger.info("参数isGetPurchasePrice的值为{}",getRoomPriceVo.isGetPurchasePrice());
        GetRoonPriceReturnVo getRoonPriceReturnVo=new GetRoonPriceReturnVo();
        if(getRoomPriceVo.isGetPurchasePrice()){
            if(!StringUtils.isEmpty(jsonObject.getString("roomPurchasePrices"))){
                List<RoomPricesVo> roomPricesVos= JacksonUtil.jsonToList(jsonObject.getString("roomPurchasePrices"), RoomPricesVo.class);
                getRoonPriceReturnVo.setRoomPurchasePrices(roomPricesVos);
            }
        }else{
            //多数据无法解析需要配置类,进行映射
           /* JsonConfig jsonConfig=new JsonConfig();
            Map<String,Class> classMap=new HashMap<>();
            classMap.put("roomPrices",RoomPricesVo.class);
            jsonConfig.setClassMap(classMap);
            jsonConfig.setPropertySetStrategy(new PropertyStrategyWrapper(PropertySetStrategy.DEFAULT));*/
           // List<ChannelRoomPricesVo> channelRoomPricesVo=JacksonUtil.jsonToList(jsonObject.getString("channelRoomPrices"),new ChannelRoomPricesVo(),jsonConfig);
            List<ChannelRoomPricesVo> channelRoomPricesVo=JacksonUtil.jsonToList(jsonObject.getString("channelRoomPrices"), ChannelRoomPricesVo.class);
            getRoonPriceReturnVo.setChannelRoomPrices(channelRoomPricesVo);
        }
        return new Result<>(getRoonPriceReturnVo);
    }

    /**
     * 获取房态接口
     * @param getRoomPriceVo
     * @return
     */
    @Override
    @Retryable(value = Exception.class,maxAttempts = 4,backoff = @Backoff(delay = 2000,multiplier = 1.5))
    public Result<Object> getRoomStatusDirect(GetRoomPriceVo getRoomPriceVo) {
        Map<String,Object> map=new HashMap<>();
        String channel=getRoomPriceVo.getChannel();
        if(org.springframework.util.StringUtils.isEmpty(channel)){
            return new Result<>("渠道不能为空", CommonConstants.PARAMETER_ERROR);
        }
        map.put("channel",channel);
        int hotelId=getRoomPriceVo.getHotelId();
        if(hotelId<1){
            return new Result<>("酒店id不能为空", CommonConstants.PARAMETER_ERROR);
        }
        map.put("hotelId",hotelId);
        int[] roomIds=getRoomPriceVo.getRoomIds();
        if(roomIds.length<1){
            return new Result<>("房型id不能为空", CommonConstants.PARAMETER_ERROR);
        }
        if(roomIds.length>30){
            return new Result<>("一次不能超过30个房型", CommonConstants.PARAMETER_ERROR);
        }
        map.put("roomIds",roomIds);
        String startDate=getRoomPriceVo.getStartDate();
        String endDate=getRoomPriceVo.getEndDate();
        if(org.springframework.util.StringUtils.isEmpty(startDate)|| org.springframework.util.StringUtils.isEmpty(endDate)){
            return new Result<>("wrong start|end date:start=null,end=null", CommonConstants.PARAMETER_ERROR);
        }
        map.put("startDate",startDate);
        map.put("endDate",endDate);
        logger.info("获取房态接口");
        String result= SwitchsHttpUtils.sendRequest(map,"GetRoomStatusDirect",profile);
        //对结构进行格式化
        JSONObject jsonObject = JSONObject.parseObject(result);
        System.out.println(result);
        ResultStatusInfoVo resultStatusInfoVo= JacksonUtil.parse(jsonObject.getString("resultStatus"),ResultStatusInfoVo.class);
        if(resultStatusInfoVo.getResultCode()!=0){
            return new Result<>(resultStatusInfoVo.getResultMsg(), CommonConstants.REQUEST_ERROR);
        }
        List<ChannelRoomStatusVo> roomPricesVos=JacksonUtil.jsonToList(jsonObject.getString("channelRoomStatus"), ChannelRoomStatusVo.class);
        return new Result<>(roomPricesVos);
    }

    /**
     * 获取房量接口
     * @param getRoomPriceVo
     * @return
     */
    @Override
    @Retryable(value = Exception.class,maxAttempts = 4,backoff = @Backoff(delay = 2000,multiplier = 1.5))
    public Result<Object> getRoomInventoryDirect(GetRoomPriceVo getRoomPriceVo) {
        Map<String,Object> map=new HashMap<>();
        String channel=getRoomPriceVo.getChannel();
        if(org.springframework.util.StringUtils.isEmpty(channel)){
            return new Result<>("渠道不能为空", CommonConstants.PARAMETER_ERROR);
        }
        map.put("channel",channel);
        int hotelId=getRoomPriceVo.getHotelId();
        if(hotelId<1){
            return new Result<>("酒店id不能为空", CommonConstants.PARAMETER_ERROR);
        }
        map.put("hotelId",hotelId);
        int[] roomIds=getRoomPriceVo.getRoomIds();
        if(roomIds.length<1){
            return new Result<>("房型id不能为空", CommonConstants.PARAMETER_ERROR);
        }
        if(roomIds.length>30){
            return new Result<>("一次不能超过30个房型", CommonConstants.PARAMETER_ERROR);
        }
        map.put("roomIds",roomIds);
        String startDate=getRoomPriceVo.getStartDate();
        String endDate=getRoomPriceVo.getEndDate();
        if(org.springframework.util.StringUtils.isEmpty(startDate)|| org.springframework.util.StringUtils.isEmpty(endDate)){
            return new Result<>("wrong start|end date:start=null,end=null", CommonConstants.PARAMETER_ERROR);
        }
        map.put("startDate",startDate);
        map.put("endDate",endDate);
        logger.info("获取房量接口");
        String result= SwitchsHttpUtils.sendRequest(map,"GetRoomInventoryDirect",profile);
        //对结构进行格式化
        JSONObject jsonObject = JSONObject.parseObject(result);
        System.out.println(result);
        ResultStatusInfoVo resultStatusInfoVo= JacksonUtil.parse(jsonObject.getString("resultStatus"),ResultStatusInfoVo.class);
        if(resultStatusInfoVo.getResultCode()!=0){
            return new Result<>(resultStatusInfoVo.getResultMsg(), CommonConstants.REQUEST_ERROR);
        }
        if(StringUtils.isEmpty(jsonObject.getString("roomInventoryList"))){
            return new Result<>(new ArrayList<>());
        }
        List<RoomInventroyVo> roomPricesVos=JacksonUtil.jsonToList(jsonObject.getString("roomInventoryList"), RoomInventroyVo.class);
        return new Result<>(roomPricesVos);
    }

    /**
     * 获取动态售卖规则接口
     * @param getRoomPriceVo
     * @return
     */
    @Override
    @Retryable(value = Exception.class,maxAttempts = 4,backoff = @Backoff(delay = 2000,multiplier = 1.5))
    public Result<Object> getSaleRuleDirect(GetRoomPriceVo getRoomPriceVo) {
        Map<String,Object> map=new HashMap<>();
        //true 携程 false 非携程渠道
        boolean is_ctrip=false;
        String channel=getRoomPriceVo.getChannel();
        if(org.springframework.util.StringUtils.isEmpty(channel)){
            return new Result<>("渠道不能为空", CommonConstants.PARAMETER_ERROR);
        }
        map.put("channel",channel);
        int hotelId=getRoomPriceVo.getHotelId();
        if(hotelId<1){
            return new Result<>("酒店id不能为空", CommonConstants.PARAMETER_ERROR);
        }
        map.put("hotelId",hotelId);
        int[] roomIds=getRoomPriceVo.getRoomIds();
        if(roomIds.length<1){
            return new Result<>("房型id不能为空", CommonConstants.PARAMETER_ERROR);
        }
        if(roomIds.length>30){
            return new Result<>("一次不能超过30个房型", CommonConstants.PARAMETER_ERROR);
        }
        map.put("roomTypeList",roomIds);
        String startDate=getRoomPriceVo.getStartDate();
        String endDate=getRoomPriceVo.getEndDate();
        if(org.springframework.util.StringUtils.isEmpty(startDate)|| org.springframework.util.StringUtils.isEmpty(endDate)){
            return new Result<>("wrong start|end date:start=null,end=null", CommonConstants.PARAMETER_ERROR);
        }
        map.put("startDate",startDate);
        map.put("endDate",endDate);
        logger.info("获取动态售卖规则接口");
        String result= SwitchsHttpUtils.sendRequest(map,"GetSaleRuleDirect",profile);
        //对结构进行格式化
        JSONObject jsonObject = JSONObject.parseObject(result);
        System.out.println(result);
        ResultStatusInfoVo resultStatusInfoVo= JacksonUtil.parse(jsonObject.getString("resultStatus"),ResultStatusInfoVo.class);
        if(resultStatusInfoVo.getResultCode()!=0){
            return new Result<>(resultStatusInfoVo.getResultMsg(), CommonConstants.REQUEST_ERROR);
        }
        //多数据无法解析需要配置类,进行映射
        /*JsonConfig jsonConfig=new JsonConfig();
        Map<String,Class> classMap=new HashMap<>();
        classMap.put("cancelDetails",CancelDetailsVo.class);
        jsonConfig.setClassMap(classMap);
        jsonConfig.setPropertySetStrategy(new PropertyStrategyWrapper(PropertySetStrategy.DEFAULT));*/
        List saleRuleVos=JacksonUtil.jsonToList(jsonObject.getString("roomSaleRuleList"), SaleRuleVo.class);
        return new Result<>(saleRuleVos);
    }

    /**
     * 获取房价房态房量变化接口
     * @param getRoomRateChangeVo
     * @return
     */
    @Override
    @Retryable(value = Exception.class,maxAttempts = 4,backoff = @Backoff(delay = 2000,multiplier = 1.5))
    public Result<Object> getRoomRateChange(GetRoomRateChangeVo getRoomRateChangeVo) {
        Map<String,Object> map=new HashMap<>();
        String channel=getRoomRateChangeVo.getChannel();
        if(org.springframework.util.StringUtils.isEmpty(channel)){
            return new Result<>("渠道不能为空", CommonConstants.PARAMETER_ERROR);
        }
        map.put("channel",channel);
        int hotelId=getRoomRateChangeVo.getHotelId();
        if(hotelId<1){
            return new Result<>("酒店id不能为空", CommonConstants.PARAMETER_ERROR);
        }
        map.put("hotelId",hotelId);
        int type=getRoomRateChangeVo.getType();
        if(type==0){
            return new Result<>("变化类型不能为空", CommonConstants.PARAMETER_ERROR);
        }
        map.put("type",type);
        String startDate=getRoomRateChangeVo.getStartTime();
        String endDate=getRoomRateChangeVo.getEndTime();
        System.out.println(startDate);
        if(org.springframework.util.StringUtils.isEmpty(startDate)|| org.springframework.util.StringUtils.isEmpty(endDate)){
            return new Result<>("wrong start|end date:start=null,end=null", CommonConstants.PARAMETER_ERROR);
        }
        map.put("startTime",startDate);
        map.put("endTime",endDate);
        Map<String,Object> requestPager=new HashMap<>();
        requestPager.put("pageSize",getRoomRateChangeVo.getPageSize());
        requestPager.put("pageIndex",getRoomRateChangeVo.getPageIndex());
        requestPager.put("isReturnTotalCount",getRoomRateChangeVo.isReturnTotalCount());
        map.put("requestPager",requestPager);
        logger.info("获取房价房态房量变化接口");
        String result= SwitchsHttpUtils.sendRequest(map,"GetRoomRateChange",profile);
        //对结构进行格式化
        JSONObject jsonObject = JSONObject.parseObject(result);
        System.out.println(result);
        ResultStatusInfoVo resultStatusInfoVo= JacksonUtil.parse(jsonObject.getString("resultStatus"),ResultStatusInfoVo.class);
        if(resultStatusInfoVo.getResultCode()!=0){
            return new Result<>(resultStatusInfoVo.getResultMsg(), CommonConstants.REQUEST_ERROR);
        }
        List<RoomRateChangVo> roomRateChangeList= JacksonUtil.jsonToList(jsonObject.getString("roomRateChangeList"), RoomRateChangVo.class);
        GetRoomRateChangeReturnVo getRoomRateChangeReturnVo=new GetRoomRateChangeReturnVo();
        getRoomRateChangeReturnVo.setRoomRateChangeList(roomRateChangeList);
        PagerVo pagerVo=JacksonUtil.parse(jsonObject.getString("pagingType"), PagerVo.class);
        getRoomRateChangeReturnVo.setPagingType(pagerVo);
        return new Result<>(getRoomRateChangeVo);
    }

    /**
     * 直接推送报价等数据接口
     * @param batchPushRoomVo
     * @return
     */
    @Override
    public Result<Map<String,String>> batchPushRoomData(BatchPushRoomVo batchPushRoomVo) {
        Map<String,Object> map=new HashMap<>();
        //获取酒店id
        int hotelId=batchPushRoomVo.getHotelId();
        if(hotelId==0){
            return new Result<>("酒店id不能为空");
        }
        map.put("hotelId",hotelId);

        int day=0;
        List<RoomDataEntityVo> roomDataEntityVos=batchPushRoomVo.getRoomDataEntitys();
        if(roomDataEntityVos.size()<1){
            return new Result<>("房型推送数据实体不能为空");
        }
        for (RoomDataEntityVo roomDataEntityVo:roomDataEntityVos){
            int roomId=roomDataEntityVo.getRoomId();
            if(roomId==0){
                return new Result<>("售卖房型Id不能为空");
            }
            String startDate=roomDataEntityVo.getStartDate();
            if(org.springframework.util.StringUtils.isEmpty(startDate)){
                return new Result<>("开始时间不能为空");
            }
            String endDate=roomDataEntityVo.getEndDate();
            if(org.springframework.util.StringUtils.isEmpty(endDate)){
                return new Result<>("结束时间不能为空");
            }
            day=day+ DateUtil.getIntervalDays(startDate,endDate);
            //房价推送实体
            RoomPriceModelVo roomPriceModelVo=roomDataEntityVo.getRoomPriceModel();
            if(!ObjectUtils.isEmpty(roomPriceModelVo)){
                double roomPrice=roomPriceModelVo.getRoomPrice();
                if(roomPrice==0){
                    return new Result<>("房价不能为空");
                }
                String channel=roomPriceModelVo.getChannel();
                if(org.springframework.util.StringUtils.isEmpty(channel)){
                    return new Result<>("渠道不能为空");
                }
            }
            //采购价推送实体
         /*   PurchasePriceModelVo purchasePriceModelVo=roomDataEntityVo.getPurchasePriceModel();
            if(!ObjectUtils.isEmpty(purchasePriceModelVo)){
                double roomPrice=purchasePriceModelVo.getPurchasePrice();
                if(roomPrice==0){
                    return new Result<>("房价不能为空");
                }
            }*/
            //动态售卖规则实体 暂时不需要设置因为创建已经设置过
            /*SaleRuleModelVo saleRuleModelVo=roomDataEntityVo.getSaleRuleModel();
            if(!StringUtils.isEmpty(saleRuleModelVo.getChannel())){
                if(!ObjectUtils.isEmpty(saleRuleModelVo.getSellingRule())){
                    SellingRuleVo sellingRuleVo=saleRuleModelVo.getSellingRule();
                    if(sellingRuleVo.getLatestconfirmTimeOfHours()==0){
                        return new Result<>("最晚立即确认时间-小时部分设置非法roomId="+roomId+",startDate="+startDate+",endDate="+endDate+",channel="+saleRuleModelVo.getChannel()+"最晚立即确认时间-小时部分0");
                    }
                }
                if(!ObjectUtils.isEmpty(saleRuleModelVo.getCtripSellRule())){
                    CtripSellRuleVo ctripSellRuleVo=saleRuleModelVo.getCtripSellRule();
                    if(ctripSellRuleVo.getLatestconfirmTimeOfHours()==0){
                        return new Result<>("ctri最晚立即确认时间-小时部分设置非法roomId="+roomId+",startDate="+startDate+",endDate="+endDate+",channel="+saleRuleModelVo.getChannel()+"最晚立即确认时间-小时部分0");
                    }
                    if(ctripSellRuleVo.getLatestBookingTimeOfHours()==0){
                        return new Result<>("ctri最晚预定时间-小时部分设置非法roomId="+roomId+",startDate="+startDate+",endDate="+endDate+",channel="+saleRuleModelVo.getChannel()+"最晚立即确认时间-小时部分0");
                    }
                    if(ctripSellRuleVo.getLatestCancelTimeOfHours()==0){
                        return new Result<>("ctri最晚取消时间-小时部分设置非法roomId="+roomId+",startDate="+startDate+",endDate="+endDate+",channel="+saleRuleModelVo.getChannel()+"最晚立即确认时间-小时部分0");
                    }
                }
            }*/
        }
        //多个房型涉及的天数不能大于300（房型个数*天数）
        if(day*roomDataEntityVos.size()>300){
            return new Result<>("多个房型涉及的天数不能大于300（房型个数*天数）");
        }
        map.put("roomDataEntitys",roomDataEntityVos);
        logger.info("直接推送报价等数据接口");
        String result= SwitchsHttpUtils.sendRequest(map,"BatchPushRoomData",profile);
        //对结构进行格式化
        JSONObject jsonObject = JSONObject.parseObject(result);
        System.out.println(result);
        ResultStatusInfoVo resultStatusInfoVo= JacksonUtil.parse(jsonObject.getString("resultStatus"),ResultStatusInfoVo.class);
        if(resultStatusInfoVo.getResultCode()!=0){
            return new Result<>(resultStatusInfoVo.getResultMsg(), CommonConstants.REQUEST_ERROR);
        }
        String logKey=jsonObject.getString("logKey");
        Map<String,String> resultData=new HashMap<>();
        resultData.put("logKey",logKey);
        return new Result<>(resultData);
    }

    /**
     *  获取推送数据错误日志接口
     * @param getPushRoomDataLogVo
     * @return
     */
    @Retryable(value = Exception.class,maxAttempts = 4,backoff = @Backoff(delay = 2000,multiplier = 1.5))
    @Override
    public Result<Object> getPushRoomDataLog(GetPushRoomDataLogVo getPushRoomDataLogVo) {
        Map<String,Object> map=new HashMap<>();
        String rowKey=getPushRoomDataLogVo.getRowKey();
        if(!StringUtils.isEmpty(rowKey)){
            map.put("rowKey",rowKey);
        }else{
           /* if(getPushRoomDataLogVo.getHotelId()!=0){
                map.put("hotelId",getPushRoomDataLogVo.getHotelId());
            }
            int type=getPushRoomDataLogVo.getType();
            if(type<1||type>4){
                return new Result<>("变化类型（1是房价，2是房态，3是房量,4是售卖规则）,请检查参数");
            }
            map.put("type",type);
            String channel=getPushRoomDataLogVo.getChannel();
            if(StringUtils.isEmpty(channel)){
                return new Result<>("变化渠道不能为空");
            }
            map.put("channel",channel);
            String startTime=getPushRoomDataLogVo.getStartTime();
            if(StringUtils.isEmpty(startTime)){
                return new Result<>("开始时间不能为空");
            }
            map.put("startTime",startTime);
            String endTime=getPushRoomDataLogVo.getEndTime();
            if(StringUtils.isEmpty(startTime)){
                return new Result<>("结束日期不能为空");
            }
            map.put("endTime",endTime);*/
        }
        Map<String,Object> requestPager=new HashMap<>();
        requestPager.put("pageSize",getPushRoomDataLogVo.getPageSize());
        requestPager.put("pageIndex",getPushRoomDataLogVo.getPageIndex());
        requestPager.put("isReturnTotalCount",getPushRoomDataLogVo.isReturnTotalCount());
        map.put("requestPager",requestPager);
        int type=getPushRoomDataLogVo.getType();
        if(type<1||type>4){
            return new Result<>("变化类型（1是房价，2是房态，3是房量,4是售卖规则）,请检查参数");
        }
        map.put("type",type);
        map.put("channel","Ctrip");
        map.put("startTime","2020-07-01");
        map.put("endTime","2020-07-06");
        String result= SwitchsHttpUtils.sendRequest(map,"GetPushRoomDataLog",profile);
        //对结构进行格式化
        JSONObject jsonObject = JSONObject.parseObject(result);
        System.out.println(result);
        ResultStatusInfoVo resultStatusInfoVo= JacksonUtil.parse(jsonObject.getString("resultStatus"),ResultStatusInfoVo.class);
        if(resultStatusInfoVo.getResultCode()!=0){
            return new Result<>(resultStatusInfoVo.getResultMsg(), CommonConstants.REQUEST_ERROR);
        }
        List<PushRoomDataLogReturnVo> pushRoomDataLogReturnVos=JacksonUtil.jsonToList(jsonObject.getString("pushRoomDataLogList"), PushRoomDataLogReturnVo.class);
        PagerVo pagerVo=JacksonUtil.parse(jsonObject.getString("pagingType"), PagerVo.class);
        PushLogVo pushLogVo=new PushLogVo();
        pushLogVo.setPushRoomDataLogList(pushRoomDataLogReturnVos);
        pushLogVo.setPagingType(pagerVo);
        return new Result<>(pushLogVo);
    }
}
